<div class="schedule-save">
  <h2 mat-dialog-title>保存日程</h2>
  <mat-dialog-content>
    <form>
      <div>
        <mat-form-field>
          <input 
              matInput 
              placeholder="标题" 
              name="title"
              [formControl]="titleControl" 
              [(ngModel)]="schedule.title">
        </mat-form-field>
      </div>

      <div>
        <mat-form-field>
          <textarea 
          matInput 
          placeholder="描述"
          name="description"
           [formControl]="contentControl" 
          [(ngModel)]="schedule.description">
          </textarea>
        </mat-form-field>
      </div>
      <div>
        <mat-form-field>
            <input [matDatepicker]="pickerBeginTime" placeholder="开始时间" matInput name="beginTime" [(ngModel)]="schedule.beginTime">
            <mat-datepicker-toggle matSuffix [for]="pickerBeginTime"></mat-datepicker-toggle>
            <mat-datepicker #pickerBeginTime></mat-datepicker>
        </mat-form-field>-
        <mat-form-field>
            <input [matDatepicker]="pickerEndTime" placeholder="结束时间" matInput name="endTime" [(ngModel)]="schedule.endTime">
            <mat-datepicker-toggle matSuffix [for]="pickerEndTime"></mat-datepicker-toggle>
            <mat-datepicker #pickerEndTime></mat-datepicker>
        </mat-form-field>
      </div>

      <div>
        <mat-form-field>
          <mat-select 
          matInput
          placeholder="紧急程度" 
          name="degree"
           [(ngModel)]="schedule.degree">
            <mat-option *ngFor="let arr of degrees" [value]="arr[0]">
              {{ arr[1] }}
            </mat-option>
          </mat-select>
        </mat-form-field>
      </div>

      <!-- <div>
        <mat-form-field>
          <mat-select 
            matInput
            placeholder="分类" 
            name="category" 
            [(ngModel)]="schedule.category"></mat-select>
        </mat-form-field>
      </div> -->
    </form>
  </mat-dialog-content>

  <mat-dialog-actions>
    <button mat-raised-button mat-dialog-close>关闭</button>
    <button mat-button [mat-dialog-close]="schedule">保存</button>
  </mat-dialog-actions>
</div>  